/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --primary-color: #e60000;
    --primary-dark: #8b0000;
    --glass-bg: rgba(25, 25, 25, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.3s ease;
}

[data-theme="light"] {
    --bg-color: #f4f4f4;
    --text-color: #111111;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor for custom cursor */
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 5px; }

/* ==========================================================================
   Utilities & Layout
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.section { padding: 80px 0; }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.w-100 { width: 100%; }

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.btn-primary {
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
    color: #fff;
}
.btn-primary:hover { box-shadow: 0 0 15px var(--primary-color); }
.btn-outline {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--primary-color);
}
.btn-outline:hover { background: var(--primary-color); color: #fff; }

/* Custom Cursor */
.cursor-dot {
    width: 8px; height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: fixed; top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}
.cursor-outline {
    width: 30px; height: 30px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: fixed; top: 0; left: 0;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
}
/* Disable custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    * { cursor: auto; }
    .cursor-dot, .cursor-outline { display: none; }
}

/* Loader */
.loader-wrapper {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; z-index: 10000;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: opacity 0.5s ease;
}
.loader-spinner {
    width: 50px; height: 50px;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Scroll Progress */
.scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px;
    background: var(--primary-color);
    width: 0%; z-index: 1000;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed; width: 100%; top: 0; z-index: 900;
    padding: 20px 0; transition: var(--transition);
}
.navbar.sticky {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
}
.nav-container {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.logo { font-size: 1.8rem; font-weight: 800; color: var(--text-color); text-decoration: none; }
.logo span { color: var(--primary-color); }
.nav-links { display: flex; list-style: none; gap: 20px; }
.nav-links a {
    color: var(--text-color); text-decoration: none; font-weight: 500;
    position: relative; padding: 5px 0;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0%; height: 2px; background: var(--primary-color);
    transition: var(--transition);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 15px; }
.nav-actions button {
    background: none; border: none; color: var(--text-color); font-size: 1.2rem;
}
.hamburger { display: none; flex-direction: column; gap: 5px; }
.hamburger span { width: 25px; height: 3px; background: var(--text-color); transition: var(--transition); }

/* Search Overlay */
.search-overlay {
    position: fixed; top: -100%; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); z-index: 950;
    display: flex; justify-content: center; align-items: center;
    transition: top 0.4s ease;
}
.search-overlay.active { top: 0; }
.search-overlay input {
    width: 80%; max-width: 600px; padding: 15px; font-size: 1.5rem;
    background: transparent; border: none; border-bottom: 2px solid var(--primary-color);
    color: #fff; outline: none;
}
.close-search { position: absolute; top: 30px; right: 40px; font-size: 2.5rem; color: #fff; }

/* ==========================================================================
   Sections
   ========================================================================== */
/* Hero */
.hero {
    height: 100vh; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden; text-align: center;
}
.parallax-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.8), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?q=80&w=1920') center/cover;
    z-index: -1;
}
.hero-content h1 { font-size: 3.5rem; text-transform: uppercase; margin-bottom: 15px; min-height: 70px; }
.hero-content p { font-size: 1.2rem; max-width: 600px; margin: 0 auto 30px; }
.hero-buttons { gap: 15px; display: flex; justify-content: center; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; }
.hero-stats h3 { font-size: 2rem; color: var(--primary-color); }
.hero-stats span { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

/* About */
.about h2 { font-size: 2.5rem; margin-bottom: 20px; color: var(--primary-color); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-img img { width: 100%; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.feature-card { padding: 20px; text-align: center; transition: transform 0.3s; }
.feature-card:hover { transform: translateY(-5px); border-color: var(--primary-color); }
.feature-card i { font-size: 2rem; color: var(--primary-color); margin-bottom: 10px; }

/* Programs */
.programs h2 { font-size: 2.5rem; margin-bottom: 40px; }
.program-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.program-card { overflow: hidden; position: relative; }
.program-card img { width: 100%; height: 250px; object-fit: cover; transition: transform 0.5s; }
.program-card:hover img { transform: scale(1.1); }
.card-content { padding: 20px; }
.card-content h3 { margin-bottom: 10px; color: var(--primary-color); }
.card-content ul { list-style: none; margin: 15px 0; padding: 0; text-align: left; }
.card-content ul li::before { content: '✓'; color: var(--primary-color); margin-right: 10px; }

/* BMI */
.bmi-wrapper { padding: 40px; }
.bmi-wrapper h2 { margin-bottom: 30px; text-align: center; }
.bmi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.bmi-form input {
    width: 100%; padding: 15px; margin-bottom: 15px;
    background: rgba(0,0,0,0.5); border: 1px solid var(--glass-border);
    color: var(--text-color); border-radius: 4px;
}
.bmi-result h3 span { color: var(--primary-color); }

/* Pricing */
.pricing h2 { font-size: 2.5rem; margin-bottom: 40px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.pricing-card { padding: 40px 20px; position: relative; transition: transform 0.3s; }
.pricing-card:hover { transform: translateY(-10px); border-color: var(--primary-color); }
.pricing-card.popular { border: 2px solid var(--primary-color); transform: scale(1.05); }
.pricing-card.popular:hover { transform: scale(1.05) translateY(-10px); }
.badge {
    position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
    background: var(--primary-color); color: #fff; padding: 5px 15px;
    border-radius: 20px; font-size: 0.8rem; font-weight: bold;
}
.pricing-card h2 { font-size: 2.5rem; margin: 20px 0; }
.pricing-card h2 span { font-size: 1rem; color: #aaa; }
.pricing-card ul { list-style: none; margin: 0 0 30px 0; text-align: left; }
.pricing-card ul li { margin-bottom: 10px; }
.pricing-card ul li i.fa-check { color: var(--primary-color); margin-right: 10px; }
.pricing-card ul li i.fa-times { color: #555; margin-right: 10px; }

/* Trainers */
.trainers h2 { font-size: 2.5rem; margin-bottom: 20px; }
.filter-btns { margin-bottom: 30px; }
.filter-btn {
    background: none; border: 1px solid var(--glass-border); color: var(--text-color);
    padding: 8px 20px; margin: 0 5px; border-radius: 20px; transition: var(--transition);
}
.filter-btn.active, .filter-btn:hover { background: var(--primary-color); border-color: var(--primary-color); }
.trainer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.trainer-card img { width: 100%; height: 300px; object-fit: cover; border-radius: 12px 12px 0 0; }
.trainer-info { padding: 20px; }
.trainer-info .exp { color: var(--primary-color); font-weight: bold; margin: 5px 0; }
.socials a { color: var(--text-color); margin: 0 10px; transition: color 0.3s; }
.socials a:hover { color: var(--primary-color); }

/* Gallery */
.gallery h2 { font-size: 2.5rem; margin-bottom: 40px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; }
.gallery-img { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; transition: transform 0.3s; }
.gallery-img:hover { transform: scale(1.05); }

/* Lightbox */
.lightbox {
    display: none; position: fixed; z-index: 1000; top: 0; left: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.9);
    justify-content: center; align-items: center;
}
.lightbox.active { display: flex; }
.lightbox-content { max-width: 90%; max-height: 90%; border-radius: 8px; }
.close-lightbox { position: absolute; top: 20px; right: 30px; font-size: 40px; color: white; }
.prev, .next {
    position: absolute; top: 50%; color: white; font-size: 40px;
    padding: 16px; margin-top: -22px; transition: 0.6s ease; user-select: none;
}
.prev { left: 20px; } .next { right: 20px; }
.prev:hover, .next:hover { color: var(--primary-color); }

/* Counters */
.counter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; text-align: center; }
.counter-item i { font-size: 3rem; color: var(--primary-color); margin-bottom: 15px; }
.counter-item h3 { font-size: 2.5rem; }

/* Testimonials */
.testimonials h2 { font-size: 2.5rem; margin-bottom: 40px; }
.testimonial-slider { position: relative; max-width: 800px; margin: 0 auto; padding: 40px; text-align: center; overflow: hidden; }
.slides { display: flex; transition: transform 0.5s ease-in-out; }
.slide { min-width: 100%; padding: 0 20px; }
.slide img { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 15px; border: 2px solid var(--primary-color); }
.stars { color: #ffd700; margin-bottom: 15px; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-color); font-size: 1.5rem; }
.prev-btn { left: 10px; } .next-btn { right: 10px; }
.slider-btn:hover { color: var(--primary-color); }

/* Contact & Forms */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.accordion-item { margin-bottom: 10px; }
.accordion-header {
    width: 100%; text-align: left; padding: 15px; background: var(--glass-bg);
    border: 1px solid var(--glass-border); color: var(--text-color);
    font-size: 1rem; border-radius: 4px; display: flex; justify-content: space-between;
}
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; padding: 0 15px; }
.accordion-content p { padding: 15px 0; }
.input-group { margin-bottom: 15px; }
.input-group input, .input-group select, .input-group textarea {
    width: 100%; padding: 12px; background: rgba(0,0,0,0.5); border: 1px solid var(--glass-border);
    color: var(--text-color); border-radius: 4px; font-family: inherit;
}
.contact-info { padding: 20px; }
.contact-info p { margin-bottom: 10px; }
.contact-info i { color: var(--primary-color); margin-right: 10px; }

/* Footer */
.footer { background: #000; padding: 60px 0 20px; border-top: 1px solid #222; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { margin-bottom: 20px; color: var(--primary-color); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: #ccc; text-decoration: none; transition: color 0.3s; }
.footer-col ul a:hover { color: var(--primary-color); }
.newsletter-form { display: flex; margin-top: 15px; }
.newsletter-form input { flex: 1; padding: 10px; border: none; outline: none; background: #222; color: #fff; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #222; color: #777; }

/* Animations & Utilities */
.reveal { opacity: 0; transition: all 0.8s ease; }
.reveal.active { opacity: 1; }
.fade-up { transform: translateY(50px); }
.fade-up.active { transform: translateY(0); }
.slide-left { transform: translateX(-50px); }
.slide-left.active { transform: translateX(0); }
.slide-right { transform: translateX(50px); }
.slide-right.active { transform: translateX(0); }
.zoom { transform: scale(0.9); }
.zoom.active { transform: scale(1); }

.back-to-top {
    position: fixed; bottom: 30px; right: 30px; width: 40px; height: 40px;
    background: var(--primary-color); color: white; border: none; border-radius: 50%;
    font-size: 1.2rem; display: none; z-index: 999;
}
.back-to-top.visible { display: block; animation: float 2s infinite ease-in-out; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Toast */
#toast-container { position: fixed; top: 80px; right: 20px; z-index: 10000; }
.toast {
    background: var(--primary-color); color: #fff; padding: 15px 25px;
    margin-bottom: 10px; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideInRight 0.3s forwards, fadeOut 0.3s 2.7s forwards;
}
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* Ripple Effect */
.ripple::after {
    content: ""; position: absolute; width: 100px; height: 100px; background: rgba(255,255,255,0.3);
    border-radius: 50%; transform: scale(0); opacity: 0; pointer-events: none;
}
.ripple.animate::after { animation: rippleAnim 0.6s linear; }
@keyframes rippleAnim { 0% { transform: scale(0); opacity: 0.5; } 100% { transform: scale(4); opacity: 0; } }

/* ==========================================================================
   Media Queries (Mobile First adjusted for Desktop)
   ========================================================================== */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links {
        position: fixed; right: -100%; top: 70px; flex-direction: column;
        background: rgba(0,0,0,0.95); width: 100%; height: calc(100vh - 70px);
        text-align: center; padding-top: 50px; transition: right 0.3s ease;
    }
    .nav-links.active { right: 0; }
    .hero-content h1 { font-size: 2.2rem; }
    .about-grid, .bmi-grid, .contact-grid { grid-template-columns: 1fr; }
    .pricing-card.popular { transform: none; }
    .pricing-card.popular:hover { transform: translateY(-10px); }
}